//
//  BaseViewController.h
//  wtshoppingcite
//
//  Created by xiangming on 14-10-15.
//  Copyright (c) 2014年 TW. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "EGORefreshTableFooterView.h"
#import "EGORefreshTableHeaderView.h"
#import "MBProgressHUD.h"

@interface BaseViewController : UIViewController<EGORefreshTableDelegate>
{
    //EGOHeader
    EGORefreshTableHeaderView *_refreshHeaderView;
    //EGOFoot
    EGORefreshTableFooterView *_refreshFooterView;
    //
}
@property (nonatomic, assign) BOOL isBackButton;
@property (nonatomic, assign) BOOL isCancelButton;
@property (nonatomic, assign) BOOL isRightMenuButton;
@property (nonatomic,strong) UIButton *menuButton;
@property (nonatomic,strong) UIButton *backButton;
@property (nonatomic,strong) UIButton *cancleButton;
@property(nonatomic,assign) NSInteger curpage;
@property(nonatomic,assign) BOOL isLoadMoreData;
@property (nonatomic, strong) MBProgressHUD *hud;
@property (nonatomic,strong) UIImageView* loadImageView;


//hud
- (void)showProgressHUD;
- (void)showProgressHUDWithTitle:(NSString *)title;
- (void)hideProgressHUD;
- (void)showToastMessage:(NSString *)message;
- (void)showToastWithMessage:(NSString *)message showTime:(float)interval;


- (void)setTitleView:(NSString *)titleName;//设置标题
-(void)setRightButton:(NSString*)titleName sel:(SEL)selector viewController:(UIViewController*)viewController;

- (void)backAction;
- (void)cancelAction;

-(UILabel*)createLabelWithFrame:(CGRect)frame text:(NSString*)text font:(int)font textAli:(NSTextAlignment)alig textColor:(UIColor*)tc;
- (UITextField *)createTextFieldWithFrame:(CGRect)frame text:(NSString *)txt fontSize:(int)size;

- (void)showAlertView:(NSString *)title message:(NSString *)msg;

- (void)showLoadImageView:(UIView*)supview subview:(UIView*)view;
- (void)dismissLoadImageView;

-(void)LoginAciton;

-(UIView*)createFavViewWithFrame:(CGRect)rect;
//加小红点
-(void)addRedFlotMessagePushDataWithUimageView:(UIView*)supView;
-(void)removeRedFlotMessagePushDataWithUimageView:(UIView*)supView;

@end
